package com.zz.controller;

import com.zz.service.OutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Copyright Zz
 * FileName: OutController
 * Author:   Zz
 * Date:     2023/6/820:18
 * Description:出院控制层
 * hISTORY:
 * <author>  <time>     <version>    <desc>
 * 作者姓名   修改时间       版本号       描述
 */
@Controller
@RequestMapping("Out")
public class OutController {

    @Autowired
    private OutService outService;

    /**
     * 申请出院
     *
     * @param ID 身份证号
     * @return 1-成功出院 2-在院信息查无此病人 0-失败
     */
    @DeleteMapping("applyfor")
    @ResponseBody
    public int applyforOut(@RequestBody String ID) {
        return outService.applyforOut(ID);
    }
}
